.PHONY: all clean new informe
all: informe.pdf
new: clean all
informe: informe.pdf
	okular informe.pdf &> /dev/null &

clean:
	rm -rf logs
	rm -f informe.pdf

informe.pdf: informe.tex *.sty otros/*.sty problema1/* problema2/* problema3/*
	mkdir -p logs
	pdflatex $<
	while grep -qi 'rerun to get cross' informe.log; do pdflatex $<; done
	mv -f *.toc *.aux *.idx *.log	*.out logs/
